package com.corpgovernment.organization.mapper;

import com.corpgovernment.organization.common.mybatis.TkMapper;
import com.corpgovernment.organization.entity.db.MbOrgTravelAttributeRelation;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 开关与员工，组织关联关系
 */
@Repository
public interface MbOrgTravelAttributeRelationMapper extends TkMapper<MbOrgTravelAttributeRelation> {
    /**
     * 根据开关id获取关联关系
     * @param ids
     * @return
     */
    List<MbOrgTravelAttributeRelation> getSwitchRelationBySwitchIds(List<Long> ids);

    /**
     * 根据orgid查出有效的关联关系
     * @param orgIds
     * @param key
     * @param
     * @return
     */
    List<MbOrgTravelAttributeRelation> getSwitchRelationByOrgIds(List<String> orgIds, String key);

    /**
     * 获取关联关系
     * @param orgId
       @param
     * @return
     */
    List<MbOrgTravelAttributeRelation> getSwitchRelation(@Param("orgId") String orgId,@Param("uid") String uid);


    void updateListSelective(List<MbOrgTravelAttributeRelation> updateList);
}
